package com.exam.api.modules.dict.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.exam.api.common.baseModule.domain.BaseDomain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

/**
 * 字典
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_dict")
@Schema(title = "SysDict对象", description = "字典")
public class SysDict extends BaseDomain implements Serializable {

    /**
     * 主键：
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "")
    private Long id;

    /**
     * 字典编码
     */
    @TableField(value = "code")
    @Schema(description = "字典编码")
    @Length(max = 60, message = "编码长度不能超过60")
    private String code;
    /**
     * 字典名称
     */
    @TableField(value = "name")
    @Schema(description = "字典名称")
    @Length(max = 200, message = "编码长度不能超过200")
    private String name;
    /**
     * 字典描述
     */
    @TableField(value = "description")
    @Schema(description = "字典描述")
    private String description;
    /**
     * 字典类型
     */
    @TableField(value = "type")
    @Schema(description = "字典类型")
    private Integer type;
    /**
     * 0正常 1停用
     */
    @TableField(value = "status")
    @Schema(description = "0正常 1停用")
    private Integer status;


    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
